package com.xuzz.study.basic.annotation;

public class BaseDto {
    @ExcelHeader("姓名")
    String name;

    @ExcelHeader("备注")
    String memo;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

   /* public Map<String,String> getExcelHeader() throws Exception
    {
        Map<String,String> headers = new HashMap<>();
        try{
            BeanInfo beanInfo = Introspector.getBeanInfo(this.getClass());
            PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors();
            for (PropertyDescriptor property : propertyDescriptors) {
                String key = property.getName();
                if(!key.contains("class"))
                {
                    Method getMethod = property.getReadMethod();
                    ShouldBuildExcelHeader shouldBuildExcelHeader = getMethod.getDeclaredAnnotation(ShouldBuildExcelHeader.class);
                    if(null!=shouldBuildExcelHeader && shouldBuildExcelHeader.value())
                    {
                        FieldZhName fieldZhName = getMethod.getDeclaredAnnotation(FieldZhName.class);
                        headers.put(key,fieldZhName.value());
                    }
                }
            }
        }
            catch(Exception e){}
        return headers;
    }*/
}
